<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{
			padding: 0;
			margin:0;
			list-style: none 
		}
		form{
			margin: 100px auto;
			display: block;
			width: 500px;
		}
		li{
			margin:10px;
		}
	</style>
	<script type="text/javascript" src="my.js"></script>
	<script type="text/javascript">
		window.onload=function(){

            var oForm = document.getElementById('form1');
            var oUser = document.getElementsByTagName('user')[0];
            var oPass = document.getElementsByTagName('pass')[0];
            oForm.onsubmit=function(){
                setCookie('user',oUser.value,14);
                setCookie('pass',oPass.value,14);
            }

            oUser.value=getCookie('user');
            oPass.value=getCookie('pass');


		}
	</script>
</head>
<body>
	<form id="form1" action="http://www.hzbiz.net" method="post">
		<ul>
			<li><input type="text"  placeholder="用户名" name="user"></li>
			<li><input type="text"  placeholder="密码" name="pass"></li>
			<li><input type="submit" value="提交" ></li>
		</ul>
	</form>
</body>
</html>